<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="com.biz.utils.ConfigUtil" %>
	<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
    String resoursUrl = ConfigUtil.get("RESOURCES_URL");
%>

<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>个人中心</title>
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="renderer" content="webkit">
<meta http-equiv="Cache-Control" content="no-siteapp" />
<meta name="format-detection" content="telephone=no" />
  <jsp:include page="/jsp/inc_head.jsp"></jsp:include>
<style>
</style>
</head>

<body>
<div class="am-g">
	<div class="am-u-sm-12 am-pad-none grzx_top">
    	<div class="am-u-sm-3">
    	    <!-- <%=basePath %>resources/assets/image/grcenter_tx.png -->
        	<img id="headWX" src="" width="60"/>
        </div>
        <div class="am-u-sm-9">
        	<div id="name" onclick="toMyInfo();" class="grzx_name"></div>
        	<!-- 积分&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;余额&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;经验值&nbsp;&nbsp;0 -->
            <div id="otherInfo" class="grzx_jf"></div>
        </div>
    </div>
</div>
<div class="am-g">
	<ul class="am-u-sm-12 grlist">
    	<li><div onclick="toMyOrder();">全部</div></li>
    	<li><div onclick="toMyOrder();">待付款</div></li>
    	<li><div onclick="toMyOrder();">待发货</div></li>
    	<li><div onclick="toMyOrder();">已完成</div></li>
    	<li><div onclick="toMyOrder();">退款售后</div></li>
        <div class="clear"></div>
    </ul>
    <div class="am-u-sm-12 am-pad-none">
    	<div class="am-u-sm-12 am-pad-none">
        	<div onclick="toMyAccount();" class="am-u-sm-3 am-pad-none am-text-center grxz_jgg">
            	<img src="<%=resoursUrl%>resources/assets/image/grcenter_myzh.png" height="22"/><br/>
                我的账号
            </div>
        	<div onclick="toAddress();" class="am-u-sm-3 am-pad-none am-text-center grxz_jgg">
            	<img src="<%=resoursUrl%>resources/assets/image/grcenter_dz.png" height="22"/><br/>
                地址管理
            </div>
        	<div onclick="toMycoupons();" class="am-u-sm-3 am-pad-none am-text-center grxz_jgg">
            	<img src="<%=resoursUrl%>resources/assets/image/grcenter_yhq.png" height="22"/><br/>
                优惠券
            </div>
        	<div onclick="toMyIntegral()"  class="am-u-sm-3 am-pad-none am-text-center grxz_jgg" style="border-right:0;">
            	<img src="<%=resoursUrl%>resources/assets/image/grcenter_yhm.png" height="22"/><br/>
                积分码
            </div>
        </div>
    	<div class="am-u-sm-12 am-pad-none">
        	<div onclick="toMemberRating();" class="am-u-sm-3 am-pad-none am-text-center grxz_jgg">
            	<img src="<%=resoursUrl%>resources/assets/image/grcenter_hydj.png" height="22"/><br/>
                会员等级
            </div>
        	<div class="am-u-sm-6 am-pad-none am-text-center grxz_jgg">
            	<img src="<%=resoursUrl%>resources/assets/image/grcenter_mid.png" height="48"/>
            </div>
        	<div onclick="toMyIntegral();" class="am-u-sm-3 am-pad-none am-text-center grxz_jgg" style="border-right:0;">
            	<img src="<%=resoursUrl%>resources/assets/image/grcenter_myjf.png" height="22"/><br/>
                我的积分
            </div>
        </div>
    	<div class="am-u-sm-12 am-pad-none">
        	<div onclick="toMycollection();"  class="am-u-sm-3 am-pad-none am-text-center grxz_jgg">
            	<img src="<%=resoursUrl%>resources/assets/image/grcenter_mysc.png" height="22"/><br/>
                我的收藏
            </div>
        	<div class="am-u-sm-3 am-pad-none am-text-center grxz_jgg">
            </div>
        	<div class="am-u-sm-3 am-pad-none am-text-center grxz_jgg">
            </div>
        	<div class="am-u-sm-3 am-pad-none am-text-center grxz_jgg" style="border-right:0;">
            </div>
        </div>
    </div>
</div>
<!--slide start-->
<div class="am-g" id="scwrapper">
    <div class="main_visual" id="swiper_wrapper">
        <div class="flicking_con hd"><ul></ul></div>
        <div class="main_image bd">
            <div class="tempWrap">
                <ul>					
                    <!-- <li><a href=""><img src="assets/images/slide1.png"></a></li>					
                    <li><a href=""><img src="assets/images/slide1.png"></a></li> -->
                    <c:forEach items="${slidePics}" var="obj">
                       <li><a onClick="SlideHandler('${obj.id}','${obj.type}','${obj.goodsId}','${obj.url}');"><img src="${obj.path}"/></a></li>
                    </c:forEach>
                </ul>
            </div>
        </div>
    </div>
</div>
<script>
    TouchSlide({ 
	slideCell:"#swiper_wrapper",
	titCell:".hd ul", //开启自动分页 autoPage:true ，此时设置 titCell 为导航元素包裹层
	mainCell:".bd ul", 
	effect:"leftLoop", 
	autoPlay:true,//自动播放
    autoPage:true, //自动分页
    switchLoad:"_src" //切换加载，真实图片路径为"_src"
});
</script>
<!--slide end-->


<!--footer-->
<jsp:include page="/jsp/inc_bottom.jsp"></jsp:include>
<!--footer-->
<div class="am-modal am-modal-alert" tabindex="-1" id="my-alert">
	<div class="am-modal-dialog">
		<div class="am-modal-hd" id="alert_title">哎呦喂，出错啦</div>
		<div class="am-modal-bd" id="alert_message"></div>
		<div class="am-modal-footer">
			  <span class="am-modal-btn">确定</span>
		</div>
	</div>
</div>
<script>
     var ajaxpath="${pageContext.request.contextPath}";
     $(function () {
         //查询用户信息
         var url=ajaxpath+"/userCenter/getUserCenterInfo.do";
		 $.get(url,function(data){
			if(data==null||data==""){
				$("#alert_message").html("绑定信息有误，请联系客服！");
				$("#my-alert").modal('open');
			}else{
			    if(data.personName==""||data.personName==null){
			        $("#name").html("信息未完善!请点击完善");
			    }else{
			        $("#name").html(data.personName);
			    }
				if(data.headimgurl==""||data.headimgurl==null){
				    $("#headWX").attr("src","<%=resoursUrl%>resources/assets/image/grcenter_tx.png");
				}else{
				    $("#headWX").attr("src",data.headimgurl);
				}
				
				var html='积分&nbsp;&nbsp;'+data.integral+'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;余额&nbsp;&nbsp;'+data.money+'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;经验值&nbsp;&nbsp;0';
                $("#otherInfo").html(html); 
			}
		 });
          
     });
     
     
     //跳转个人资料页
     function toMyInfo(){
           window.location.href = ajaxpath+"/client_toClientInfo.do?guid="+ new Date(); 
     }
     //跳转我的账号页
     function toMyAccount(){
           window.location.href = ajaxpath+"/client_toAccountband.do?guid="+ new Date(); 
     }
     //跳转我的优惠券页
     function toMycoupons(){
           window.location.href = ajaxpath+"/client_toMycoupons.do?guid="+ new Date(); 
     }
     //跳转我的收藏页
     function toMycollection(){
           window.location.href = ajaxpath+"/client_toMycollection.do?guid="+ new Date(); 
     }
     //跳转收获地址
     function toAddress(){
           window.location.href = ajaxpath+"/client_toAddress.do?guid="+ new Date(); 
     }
     //跳转会员等级
     function toMemberRating(){
           window.location.href = ajaxpath+"/client_toMemberRating.do?guid="+ new Date(); 
     }
     //跳转我的积分
     function toMyIntegral(){
           window.location.href = ajaxpath+"/client_toMyIntegral.do?guid="+ new Date(); 
     }
     //跳转我订单
     function toMyOrder(){
           window.location.href = ajaxpath+"/jsp/order/orderList.jsp?guid="+ new Date(); 
     }
     
</script>
</body>
</html>
